import {
	request
} from "../utils/http.js"; //导入我们封装的请求方法。

//验证码登录
export const loginDySms = (data) => { //接收页面调用传递过来的参数
	return request({ //调用请求方法
		url: "/app/v1/customer/login/dy/sms", //传入请求地址
		method: "POST", //传入请求方法
		data: data //这里的参数来自于页面调用时，传过来的参数  
	})
}
//用户协议详情
export const getCustomerAgreementDetail = (type) => {
	return request({
		url: `/customer/agreement/detail/${type}`,
		method: "GET",
	})
}
// 发送验证码
export const sendCodeBtn = (phone) => {
	return request({
		url: '/app/v1/customer/login/sms/code',
		method: "GET",
		data: {
			"phone": phone
		}
	})
}
// 抖音授权登录
export const loginDyAuthorization = (data) => {
	return request({
		url: '/app/v1/customer/login/dy/authorization',
		method: "POST",
		data
	})
}
// 获取绑定手机号短信验证码
export const dyBingPhoneSms = (phone) => {
	return request({
		url: '/personal/center/dy/bing/phone/sms',
		method: "GET",
		data: {
			"phone": phone
		}
	})
}
// 抖音临时帐号绑定手机号
export const dyBingPhone = (data) => {
	return request({
		url: '/personal/center/dy/bing/phone',
		method: "POST",
		data
	})
}
// 抖音手机号快捷登录
export const customerLoginDy = (data) => {
	return request({
		url: '/app/v1/customer/login/dy',
		method: "POST",
		data
	})
}